package com.sky.controller.user;

import com.sky.dto.UserLoginDTO;
import com.sky.result.Result;
import com.sky.service.UserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/user")
public class UserController {
	
	private final UserService userService;
	
	public UserController(UserService userService) {this.userService = userService;}
	
	/**
	 * TODO 尚未设置拦截器
	 *
	 * @param loginDTO
	 * @return
	 */
	@PostMapping("/login")
	public Result userLogin(@RequestBody UserLoginDTO loginDTO) {
		return userService.userLogin(loginDTO);
	}
}
